{extend name="layout" /}
{block name="css"}
<style type="text/css">
    td {
        font-size: 13px;
    }
</style>
{/block}
{block name="content"}
<div class="content">
    <!-- begin breadcrumb -->
    <ol class="breadcrumb pull-right">
        <li><a href="{:url('Admin/Index/index')}">首页</a></li>
        <li><a href="javascript:;">系统设置</a></li>
        <li><a href="javascript:;">角色管理</a></li>
    </ol>
    <!-- end breadcrumb -->
    <!-- begin page-header -->
    <h1 class="page-header">角色管理
        <small></small>
    </h1>
    <!-- end page-header -->
    <div class="col-md-12">
        <div class="panel panel-inverse" data-sortable-id="index-1">
            <div class="panel-heading">
                <div class="panel-heading-btn">
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i
                            class="fa fa-expand"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i
                            class="fa fa-repeat"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning"
                       data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger"
                       data-click="panel-remove"><i class="fa fa-times"></i></a>
                </div>
                <h4 class="panel-title">系统所有角色</h4>
            </div>
            <div class="panel-body">
                <!-- <div id="interactive-chart" class="height-sm"></div> -->
                <table class="table table-hover table-striped">
                    <tr>
                        <td>ID</td>
                        <td>角色名称</td>
                        <td>操作</td>
                    </tr>
                    {notempty name="roles"}
                    {volist name="roles" id="vo"}
                    <tr>
                        <td>{$vo.roles_id}</td>
                        {if condition="$vo['roles_id']=='1'"}
                        <td><label class="label label-danger">{$vo.roles_name}</label></td>
                        {elseif condition="$vo['roles_id']=='2'"}
                        <td><label class="label label-warning">{$vo.roles_name}</label></td>
                        {elseif condition="$vo['roles_id']=='3'"}
                        <td><label class="label label-success">{$vo.roles_name}</label></td>
                        {else\}
                        <td><label class="label label-info">{$vo.roles_name}</label></td>
                        {/if}
                        <td>
                            <a href="{:url('admin/rolers/updaterole',['roles_id' => $vo['roles_id']])}"><i
                                    class="fa fa-pencil">修改</i> |</a>
                            <a href="{:url('admin/rolers/bindact',['roles_id' => $vo['roles_id']])}"><i
                                    class="fa fa-cog"> 权限设置</i> |</a>
                            <a href="{:url('admin/rolers/delrole',['id' => $vo['roles_id']])}" style="color: red;"><i
                                    class="fa fa-trash-o"> 删除</i></a>
                        </td>
                    </tr>
                    {/volist}
                    {/notempty}
                </table>
                <hr/>
                <a href="{:url('Admin/Roles/updaterole')}">
                    <button type="button" class="btn btn-primary pull-right">添加角色</button>
                </a>
            </div>
        </div>
    </div>
</div>
{/block}

